package month4.day13;

import java.lang.reflect.Array;
import java.util.Arrays;

public class Dish {
    private String name;
    private double capacity;//容量
    private double remaining;//剩余容量
    Software[]softwares=new Software[0];
    int soft=0;//计数
    public void anzhuang(Software software){
        int a=softwares.length+1;
        //装一个软件扩容一次
        softwares= Arrays.copyOf(softwares,a);
        softwares[soft]=software;
    }
    public Dish(String name, double capacity) {
        this.name = name;
        this.capacity = capacity;
        setRemaining(capacity);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getCapacity() {
        return capacity;
    }

    public void setCapacity(double capacity) {
        this.capacity = capacity;
    }

    public double getRemaining() {
        return remaining;
    }

    public void setRemaining(double remaining) {
        this.remaining = remaining;
    }

    public Software[] getSoftwares() {
        return softwares;
    }

    public void setSoftwares(Software[] softwares) {
        this.softwares = softwares;
    }

}
